package sa.exercises.one;

public class MaximumStressFunctions
{


	public MaximumStressFunctions(String[] args)
	{
		if(args.length !=4)
		{
			printUsage();
			System.exit(1);
		}
		else
		{
			double F = Double.parseDouble(args[0]);
			double L = Double.parseDouble(args[1]);
			double B = Double.parseDouble(args[2]);
			double D = Double.parseDouble(args[3]);
			double f=1.5*F*L/(B*(D*D));
			System.out.println(f+ "ForceUnits per LengthUnitsSquared");
			
		}
	}
	private void printUsage()
	{
		System.out.println("\nTo find the maximum stress caused by a point load acting in the centre of a simply supported beam of uniform rectangular cross section type ,enter the following  from the command line in the following format using the same units for length,breadth and depth : For example if the input value of length is in metres, the breadth and depth also should be in the same units.");
		System.out.println("\njava MaximumStressCalculator Force Length Breadth Depth");
	}

	public static void main(String[] args)
	{
		new MaximumStressFunctions(args);
	}

}